Re: Question on libpq parameters - Mailing list pgsql-general

From Owen Hartnett
Subject Re: Question on libpq parameters
Date
Msg-id p0624080bc55909e690b1@[192.168.0.107]
Whole thread Raw
In response to Re: Question on libpq parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
At 1:26 PM -0500 11/30/08, Tom Lane wrote:
>Owen Hartnett <owen@clipboardinc.com> writes:
>>  Yes, it did.  I'm confused.  My first parameter is a string, but the
>>  following two are integers.  I thought the paramType parameter
>>  indicated the type.  Do the integers need to be sprintf'd to strings?
>
>Yes.
>
>Alternatively, you could pass the integers as binary, but that's not
>notation-free either (you need htonl or some such).
>
>            regards, tom lane

Thanks, that did it. I got confused with the binary parameters, and
PQgetvalue returning the binary through a char * when it returns a
binary value.

-Owen

pgsql-general by date:

Previous
From: Guy Rouillier
Date:
Subject: Re: db backup script in gentoo
Next
From: "Stéphane A. Schildknecht"
Date:
Subject: Re: Trigger before delete does fire before, but delete doesn't not happen